package com.tougutips.like.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("like_all")
public class LikeAll implements Serializable {

    private static final long serialVersionUID = -4785127374923823910L;
    @TableId
    private long id;
    /**
     * 点赞人ID
     */
    @TableField("user_id")
    private long userId;
    /**
     * 点赞作品ID
     */
    @TableField("like_id")
    private long likeId;
    /**
     * 点赞作品ID的类型
     */
    @TableField("like_type")
    private int likeType;
    /**
     * 被点赞人的ID
     */
    @TableField("like_user_id")
    private long likeUserId;
    /**
     * 点赞时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("liketime")
    private Date likeTime;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 逻辑删除
     **/
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;
}